1. Field of the Invention
This invention relates generally to multiprocessing digital computer systems and particularly to methods and systems for passing large messages between concurrently executing processes and for synchronizing concurrently executing processes.
2. Background Information
The application of Merwin H. Alferness, et. al., Ser. No. 08/362,632, discloses a system architecture for providing improved message passing and process synchronization capabilities. Critical enhancements are made to operating system functions to permit processes executing within this system architecture to pass large messages between them without incurring large performance penalties associated with multiple copy operations on the message data. High level language support is provided in this system to enable an applications programmer to easily use the added functionality of the system. Hardware instruction level support is also provided by the system to ensure that transfers of data and synchronization of communicating processes take place at machine speeds, rather than through multiple software layers of process control in the operating system.
The system architecture, known as the "Queuing Architecture," uses queues as a mechanism for message passing and process synchronization. A queue client process places entries or events on a queue. A queue server process receives entries or events from a queue. An entry contains a message passed between a client and a server over the queue. The message consists of data or control information. An event is an indication that a condition known to both the client and server has occurred, but which contains no message. Thus, an event works as a synchronization mechanism between processes. Each element on a queue is represented in a unit of storage called a queue bank. The queue bank has a control area and a text area. The control area contains control information and pointers to other entries on a queue. The text area contains the message data. In the preferred embodiment of the present invention, the text area of a queue bank consists of 262,144 36-bit words. A queue bank may be a queue header or a queue entry. A queue is made up of one queue header and zero or more queue entries. The queue header holds control information for the queue. Queue entries hold the message data being passed between processes. To pass a message from one process to another process in the Queuing Architecture, the sending process inserts the message data into a queue entry and then enqueues it to a queue. The receiving process, which may be waiting on entries being placed on the queue, dequeues the queue entry anti processes the message data.
There are several limitations with this system architecture and how it uses queues to pass messages. The size of a message to be passed between two processes may be greater than the maximum size of a single queue bank. An approach to solving this problem would be to have the sending process split the message into multiple message segments, with each message segment being stored in a different queue entry. The receiving process would then have to know which queue entries on the queue were related to each other and how to reassemble the message from its parts. To accomplish this, control information would have to be passed in the message data (in the text area) for each message segment. The drawback to this approach is that extra software complexity is required in each process for segmenting the message data, inserting the control information into the message data, and reassembling the message. It would be more desirable for programmers writing software for application processes to not have to be burdened with this requirement. The additional segmentation and reassembling processing would also have a negative performance impact because of the extra instructions executed by the system to perform these functions.
In situations where multiple processes are dequeuing entries from the head of a single queue, this type of message segmentation would be unworkable. All message segments of a single message would need to be dequeued by the same receiving process and reassembled to form the message again for further processing. Thus, each receiving process would have to inspect the queue entries to determine if the message data in a particular queue entry is part of a series of message segments that the receiving process is currently handling. This extra processing is cumbersome and would also have a negative impact on system performance.